package com.aspose.cells;

class zceo extends zcdb {
   zceo() {
      this.d = 47;
   }

   void a(zqp var1) {
      this.c = new byte[16];
      if (!var1.b) {
         this.c[0] = -1;
         this.c[1] = -1;
      } else {
         System.arraycopy(com.aspose.cells.b.a.zc.a(var1.i), 0, this.c, 0, 2);
      }

      System.arraycopy(com.aspose.cells.b.a.zc.a(var1.e), 0, this.c, 2, 2);
      if (var1.f > 4) {
         System.arraycopy(com.aspose.cells.b.a.zc.a(var1.f - 1), 0, this.c, 4, 2);
      } else {
         System.arraycopy(com.aspose.cells.b.a.zc.a(var1.f), 0, this.c, 4, 2);
      }

      System.arraycopy(com.aspose.cells.b.a.zc.a(var1.g), 0, this.c, 6, 2);
      System.arraycopy(com.aspose.cells.b.a.zc.a(var1.h), 0, this.c, 8, 2);
      byte var2 = 0;
      Style var3 = var1.r;
      int var6;
      if (var1.c != null) {
         this.c[10] = (byte)var1.c.a();
         this.c[11] = (byte)var1.c.c();
         var6 = var2 | zcee.h(var1.c.d);
         var6 |= zcee.f(var1.c.e) << 3;
         if (var1.c.b()) {
            var6 |= 64;
         }

         this.c[12] = (byte)var6;
         var6 = 0;
         if (var1.c.d()) {
            var6 |= 1;
         }

         if (var1.c.e() == 1) {
            var6 |= 4;
         } else if (var1.c.e() == 2) {
            var6 |= 8;
         }
      } else {
         int var4 = var3.getHorizontalAlignment();
         int var5 = var3.getVerticalAlignment();
         var6 = var2 | zcee.h(var4);
         var6 |= zcee.f(var5) << 3;
         this.c[12] = (byte)var6;
         var6 = 0;
         if (var3.getShrinkToFit()) {
            var6 |= 1;
         }

         if (var3.getTextDirection() == 1) {
            var6 |= 4;
         } else if (var3.getTextDirection() == 2) {
            var6 |= 8;
         }
      }

      if (var1.d != null) {
         if (var1.d.a) {
            var6 |= 16;
         }

         if (var1.d.b) {
            var6 |= 32;
         }
      } else {
         var6 |= 16;
      }

      this.c[13] = (byte)var6;
      var6 = 0;
      if (var1.b) {
         if (var1.l) {
            var6 |= 1;
         }

         if (var1.m) {
            var6 |= 2;
         }

         if (var1.p) {
            var6 |= 4;
         }

         if (var1.q) {
            var6 |= 32;
         }
      } else {
         if (!var1.l) {
            var6 |= 1;
         }

         if (!var1.m) {
            var6 |= 2;
         }

         if (!var1.p) {
            var6 |= 4;
         }

         if (!var1.o) {
            var6 |= 8;
         }

         if (!var1.n) {
            var6 |= 16;
         }

         if (!var1.q) {
            var6 |= 32;
         }
      }

      this.c[14] = (byte)var6;
   }
}
